Skip to content

ci: install Java 8 toolchain alongside Java 21 - #2249

Closed
Vincent Biret (baywet) wants to merge 1 commit into
mainfrom
ci/install-java8-toolchain
Closed

Vincent Biret (baywet) wants to merge 1 commit into
mainfrom
ci/install-java8-toolchain

Conversation

@baywet

@baywet Vincent Biret (baywet) commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Install Temurin JDK 8 and 21 explicitly in the build workflow, keeping Java 21 as the default JVM for Gradle.

The Java 8 compatibility build requires a Java 8 compiler. The ubuntu-latest runner used by the failing job is Ubuntu 26.04, whose preinstalled JDKs do not include Java 8. Installing only Java 21 causes Gradle toolchain resolution to fail before compilation.

Failure: https://github.com/microsoft/kiota-java/actions/runs/43425097153/job/131886230916

Validation

  • git diff --check passed.
  • Verified multi-JDK installation and last-version default behavior against the pinned setup-java documentation.
  • GitHub Actions will validate the Java 8 compatibility build.

Install the Java 8 compiler required by -Pjava8=true instead of relying on the hosted runner image. Keep Java 21 as the default JVM for Gradle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: de23e4a2-18d4-4f3f-a50e-d16751ed83b7
@baywet
Vincent Biret (baywet) requested a review from a team as a code owner November 13, 2026 12:37
Copilot AI balanced review requested due to automatic review settings November 13, 2026 12:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the CI update that adds Java 8 while keeping Java 21 as the default JVM.

No open issues 🎉

What changed in this PR

This PR updates CI to provide the Java 8 compiler required by the compatibility build while keeping Java 21 as Gradle’s default JVM.

Changes:

  • Explicitly installs Temurin JDK 8 and 21 through actions/setup-java.
  • Lists Java 21 last to preserve it as the default JVM.
File Description
.github/​workflows/​build.yml Installs both JDKs for the main and Java 8 compatibility builds.

Review effort: Balanced

@sonarqubecloud

Copy link
Copy Markdown

@baywet

Copy link
Copy Markdown
Member Author

included in #2239

auto-merge was automatically disabled November 13, 2026 14:41

Pull request was closed

@github-project-automation github-project-automation Bot moved this to Done ✔️ in Kiota Nov 13, 2026
@baywet
Vincent Biret (baywet) deleted the ci/install-java8-toolchain branch November 13, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

2 participants